<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>计算</title>
	</head>
	<body>


		<div id="app">
			message : {{message}}
			<br />
			rMessage : {{rMessage}}
			<br />
			日期 : {{currentDate}}
			<!-- rMessage方法 : {{rMessage()}} -->
		</div>

		<script src="js/vue.js"></script>
		<script>
			var vm = new Vue({
				el: '#app',
				data: {
					message: 'HelloWorld'
				},
				computed: {
					rMessage: function() {
						return this.message.split("").reverse().join("");
					},
					currentDate: function() {
						return new Date();
					}
				}
			});
		</script>
	</body>
</html>
